package com.demo.connectdbtest.module.common.constants;


/**
 * 通用业务状态
 *
 * @author: helin @date: 2021/6/16 @Time: 14:36
 **/

public enum CommonBizStatus implements IBizStatus {
    //
    OK("S_OK", "SUCCESS"),

    BAD_REQUEST("BAD_REQUEST", "请求参数异常"),

    UNAUTHORIZED("UNAUTHORIZED", "登录状态过期或未登录"),

    F_FORBIDDEN("F_FORBIDDEN", "拒绝访问"),

    F_NOT_FOUND("F_NOT_FOUND", "不存在"),

    F_EXIST("F_EXIST", "已存在"),

    F_UNKNOWN("F_UNKNOWN", "冲突"),

    INTERNAL_SERVER_ERROR("SERVER_ERROR", "内部服务器错误"),

    F_ERROR("ERROR", "业务异常"),
    ;

    private String code;

    private String msg;

    CommonBizStatus(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
